package com.wp.algorithm.a1_dynamic_programing.code;

import java.util.Vector;

/**
 * @author wangpeng
 * @description
 *      * vector和arraylist的对比
 *      * https://www.cnblogs.com/williamjie/p/11158523.html
 * @date 2021/11/11 14:26
 */
public class VectorTest {
    public static void main(String[] args) {
        /**
         * 学个英语：capacity 容积
         */
        Vector<Integer> vector = new Vector<>(2,2);
        vector.add(1);
        vector.add(2);
        System.out.println(vector.size()+" "+vector.capacity());
        vector.add(3);
        System.out.println(vector.size()+" "+vector.capacity());
        vector.add(4);
        System.out.println(vector.size()+" "+vector.capacity());
    }
}
